/*
 * Copyright (c) 2020, 2023, 3044483124@qq.com All rights reserved.
 *
 */
package cn.itcast;

import java.io.File;

/**
 * <p>Project: JavaStudy - File1
 * <p>Powered by jiangbo On 2023-01-03
 * 14:33:50
 * <p>Created by IntelliJ IDEA
 *
 * @author jiangbo [3044483124@qq.com]
 * @version 1.0
 * @since 8/17
 */
public class File1 {
    public static void main(String[] args) {

        File file = new File("zhao");
        try {
            if (file.isFile() && file.exists()) {
                file.delete();
            } else {
                file.createNewFile();
            }
        } catch (Exception e) {
            System.out.println("错误");

        }
        //删除
        //file.delete();
    }
}


